package com.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.MailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;

/**
 * @classDescription:
 * @author:xiayingjie
 * @createTime:16/8/17
 */
@Configuration
public class MailConfig {

    @Bean
    public JavaMailSenderImpl mailSender(){
        JavaMailSenderImpl mailSender=new JavaMailSenderImpl();
        mailSender.setHost("smtp.163.com");
        mailSender.setPort(25);
        mailSender.setUsername("jiege82000@163.com");
        mailSender.setPassword("xyj5230");
        return mailSender;
    }


}
